package pers.jason.wppm.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import pers.jason.wppm.api.entity.system.Menu;
import pers.jason.wppm.api.entity.system.SystemManager;
import pers.jason.wppm.web.service.MenuService;
import pers.jason.wppm.web.service.SystemService;

import java.util.List;

/**
 * @ClassName: SystemController
 * @Author: JZH
 * @Date: 2018/12/28 14:19
 */
@RestController
public class SystemController {

    @Autowired
    private MenuService menuService;

    @Autowired
    private SystemService systemService;

    @GetMapping("sys/menu")
    public List<Menu> loadMenu() {
        return menuService.getSystemMenu();
    }

    @GetMapping("sys/system")
    public SystemManager getLatestSystem() {
        return systemService.getLatestSystem();
    }

}
